package dto

import "zlxBook/model"

type UserDto struct {
	Name  string `json:"name,omitempty"`
	Phone string `json:"phone,omitempty"`
}

func ToUserDto(user model.User) (dto UserDto) {

	return UserDto{
		Name:  user.Name,
		Phone: user.Phone,
	}
}
